<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Sport_area_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-sport_area_id" data-field="area_name" data-rule="required" data-source="sport/area/index" class="form-control selectpage" name="row[sport_area_id]" type="text" value="{$row.sport_area_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Score_type')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-score_type" class="form-control selectpicker" name="row[score_type]">
                {foreach name="scoreTypeList" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.score_type"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Sex')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-sex" data-rule="required" class="form-control selectpicker" name="row[sex]">
                {foreach name="sexList" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.sex"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('项目类别')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select  id="c-sport_type_id" data-rule="required" class="form-control" name="row[sport_type_id]">
                {foreach name="typeList" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.sport_type_id"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Project_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-project_name" data-rule="required" class="form-control" name="row[project_name]" type="text" value="{$row.project_name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="text" value="{$row.weigh|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Show_unit')}:</label>
        <div class="col-xs-12 col-sm-8">
          <input id="c-show_unit" data-rule="required" class="form-control" name="row[show_unit]" type="text" value="{$row.show_unit|htmlentities}" placeholder="如：分.秒.毫秒, 分.秒, 米,勿出现小数点以外的字符">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Show_val')}:</label>
        <div class="col-xs-12 col-sm-8">
          <input id="c-show_val" data-rule="required" class="form-control" name="row[show_val]" type="text" value="{$row.show_val|htmlentities}" placeholder="显示在输入框的数字">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Unit')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-unit" data-rule="required" class="form-control selectpicker" name="row[unit]">
                {foreach name="unitList" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.unit"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    {if condition="$num < 500" }
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Score_setting')}:</label>
        <div class="col-xs-12 col-sm-8">
            <table class="table fieldlist" data-template="basictpl" data-name="row[score_setting]" id="first-table">
                <tr>
                    <td>{:__('最小值(>=)')}</td>
                    <td>{:__('最大值(<=)')}</td>
                    <td>{:__('得分')}</td>
                    <td width="100"></td>
                </tr>
                <tr>
                    <td colspan="5"><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></td>
                </tr>
            </table>

            <textarea name="row[score_setting]" class="form-control hidden" cols="30" rows="5">{$row.score_setting|htmlentities}</textarea>
            <script id="basictpl" type="text/html">
                <tr class="form-inline">
                    <td><input type="text" name="<%=name%>[<%=index%>][min]" class="form-control" size="12" value="<%=row.min%>" placeholder="最小值"/></td>
                    <td><input type="text" name="<%=name%>[<%=index%>][max]" class="form-control" size="12" value="<%=row.max%>" placeholder="最大值"/></td>
                    <td><input type="text" name="<%=name%>[<%=index%>][score]" class="form-control" style="width:100px" value="<%=row.score%>" placeholder="得分"/></td>
                    <td>
                        <!--下面的两个按钮务必保留-->
                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                        <!--<span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>-->
                    </td>
                </tr>
            </script>
        </div>
    </div>
    {/if}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
